﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DistributionEduReport.aspx.cs" Inherits="School_Report_DistributionEduReport" %>

<%@ Register Src="../../Custom/ucSubject.ascx" TagName="ucSubject" TagPrefix="uc1" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>排名分布定义(局)</title>
    
    <link href="../../Common/css/main.css" rel="stylesheet" type="text/css" />    
    <script type="text/javascript" src="../../Common/Js/jquery.js"></script>
    <script type="text/javascript" src="../../Common/Js/common.js"></script>
    <script type="text/javascript" src="../../Common/Js/msg.js"></script>
    <script type="text/javascript" src="../../Common/Js/xTree/dhtmlxcommon.js"></script>
    <script type="text/javascript" src="../../Common/Js/xTree/dhtmlxtree.js"></script>
    <link href="../../Common/css/dhtmlxtree.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" >
    

    function Load()
    {
        Bind();
    }
    
    function Bind()
    {
        document.getElementById('btnBind').click();          
    }
    
    function QueryBySubject()
    {
        document.getElementById('subjectIDtxt').value = currSubjectId;
        Bind();        
    }
    
    function SetHightLight(obj)
    {
        obj.style.backgroundColor = "#fffccf";
        var table = document.getElementById('schoolSubjectList');
        for(var i =0 ; i < table.rows.length;i++)
        {
            var row = table.rows[i];
            if(row != null && row.id != obj.id)
                row.style.backgroundColor = "#ffffff";
        }
    }
    function onsubChange()
    {

        QueryBySubject();
    }
</script>


    <link href="../../Common/css/main.css" rel="stylesheet" type="text/css" />

</head>

<body onload="Load();"  scroll="no">
<div style="overflow-y:auto;overflow-x:none;height:98%;">
    <div class="mainWarp">
        <div class="pageBoby"  style="height:96%;padding-top:5px;padding-left:5px;">
            <form id="form1" runat="server">
            <table >
            <tr>
            <td  style="padding-left:4px;">
                科目：
                <uc1:ucSubject ID="UcSubject1" runat="server" />
                &nbsp;
                <input id="btnQuery" type="button" value="查询" style="display:none;" class="commonBut" onclick="QueryBySubject();" />
            </td>
            <td style="padding-left:10px;">
                <asp:UpdateProgress ID="UpdateProgress1"  runat="server" AssociatedUpdatePanelID="UpdatePanel1"><progresstemplate><img src="../../Common/images/ajaxloading.gif" /></progresstemplate></asp:UpdateProgress>
            </td>
            </tr>
            </table>
                
                <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
                </asp:ScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                 <ContentTemplate>
                
                    <asp:Repeater ID="Repeater1" runat="server">
                        <HeaderTemplate>
                         <div style="overflow-y:auto;overflow-x:none;height:98%;">
                            <table id="schoolSubjectList" border="0" cellpadding="0" cellspacing="1" class="useList" style=" width:700px;">
                                <tr class="tableTitle">
                                    <th style=" width:100px; text-align:left;padding-left:5px;" >班级名称</th>
                                    <%= GetDistributionHeaderString()%>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr id="<%#DataBinder.Eval(Container.DataItem,"RID")%>" style="background-color:White;"  onclick="SetHightLight(this);">                               
                                <td name="ClsNo" style="text-align:left; font-weight:normal;padding-left:5px;"> 
                                     <%# DataBinder.Eval(Container.DataItem, "ClsName")%>
                                </td>
                                <%# GetDistributionInfoString((int)Eval("RID"))%>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            <tr id="<%#DataBinder.Eval(Container.DataItem,"RID")%>" style="background-color:White;"  onclick="SetHightLight(this);">                               
                                <td name="ClsNo" style="text-align:left; font-weight:normal;padding-left:5px;font-weight:bold;"> 
                                     总计：
                                </td>
                                <%# GetTotalizeRowString()%>
                            </tr>
                            </table></div>
                        </FooterTemplate>
                    </asp:Repeater>
                    <webdiyer:aspnetpager id="AspNetPager1" runat="server" horizontalalign="Center"  PageSize="15"  width="100%"   PagingButtonSpacing="10px" ButtonImageAlign="left" > </webdiyer:aspnetpager> 
                 </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnBind" EventName="Click" />
                </Triggers>
                </asp:UpdatePanel>
                &nbsp;
            <div style="display: none;">
                <asp:Button ID="btnBind" runat="server" OnClick="btnBind_Click" Text="btnBind" />
                <asp:TextBox ID="subjectIDtxt" runat="server">0</asp:TextBox>
            </div>  
            </form> 
        </div>
    </div>
    </div>
</body>
</html>
<script language="javascript">
    setSubjectOnChangeFun(onsubChange);
</script>